package com.design.patterns.principle.liskovsubstitutionprinciple.violate;

/**
 * 违反里式替换原则
 * @author Wangzhiwen
 */
public class ViolateLiskovSubstitutionPrinciple {
}


class A{
    public void method(){
        System.out.println("父类A的method方法");
    }
}

class B extends A{
    @Override
    public void method() {
        System.out.println("子类B重写了父类A的方法，");
    }
}